package org.codefinger.dao.callback;

import java.sql.ResultSet;

import org.codefinger.dao.impl.ResultSetCallback;

public class IntQueryCallback implements ResultSetCallback<Integer> {

	public static final IntQueryCallback	INSTANCE	= new IntQueryCallback();

	private IntQueryCallback() {

	}

	@Override
	public Integer getResult(ResultSet resultSet, String[] aliases) throws Throwable {
		if (resultSet.next()) {
			return resultSet.getInt(1);
		}
		return null;
	}

}
